# AUTHOR: DING
# -*- codeing = utf-8 -*-
# @Time: 2024/2/2 10:47
# @Author: 86139
# @Site: 
# @File: 06-tensorboard.py
# @Software: PyCharm

from torch.utils.tensorboard import SummaryWriter
import cv2 as cv

writer = SummaryWriter("logs")

img_path = "../test_data/train/bees_image/16838648_415acd9e3f.jpg"

img = cv.imread(img_path)
writer.add_image("ant", img, 2, dataformats="HWC")
# y = 2x
# for i in range(100):
#     writer.add_scalar("y=2x", i * 2, i)

writer.close()

# 查看tensorboard
# tensorboard --logdir=pytorch/logs --port=6007
